<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'cotenant-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php //echo $form->labelEx($model,'idTenant'); ?>
		<?php echo $form->hiddenField($model,'idTenant'); ?>
		<?php //echo $form->error($model,'idTenant'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'LastName'); ?>
		<?php echo $form->textField($model,'LastName',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'LastName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'FirstName'); ?>
		<?php echo $form->textField($model,'FirstName',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'FirstName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'MiddleInitial'); ?>
		<?php echo $form->textField($model,'MiddleInitial',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'MiddleInitial'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'DateOfBirth'); ?>
		<?php //echo $form->textField($model,'DateOfBirth',array('size'=>45,'maxlength'=>45));
		$this->widget('zii.widgets.jui.CJuiDatePicker', array(

			'model'=>$model,
		    'attribute'=>'DateOfBirth',
		// additional javascript options for the date picker plugin
		    'options'=>array(
				'dateFormat'=>'yy-mm-dd',
		        'showAnim'=>'fold',
		),
		    'htmlOptions'=>array(

		),
		));
		?>
		<?php echo $form->error($model,'DateOfBirth'); ?>
	</div>

	<div class="row compactRadioGroup">
		<?php echo $form->labelEx($model,'OnLease'); ?><br>
		<?php echo $form->radioButtonList($model,'OnLease',array('1'=>'Yes','2'=>'No'), array( 'separator' => "&nbsp; &nbsp;" )); 
		//echo $form->textField($model,'OnLease',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'OnLease'); ?>
	</div>

	<div class="row">
		<?php //echo $form->labelEx($model,'LastFreeAcess'); ?>
		<?php //echo $form->textField($model,'LastFreeAcess',array('size'=>45,'maxlength'=>45)); ?>
		<?php //echo $form->error($model,'LastFreeAcess'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Add' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->